import React,{useState} from 'react'
import './Add.css';

//添加画作页面
const Addadmin = () => {
    const arr = ['管理员id: ','管理员密码: ','编辑权限: ','删除权限: '];
    const [admin,setAdmin] = useState({});
    return (
        <div className="board">
            <div className="info">
                <h3>新增列表</h3>
                <form action = "https://api.luffe.club:3001/admin" method = "POST" enctype="multipart/form-data">
                <div className="addList">
                    <ul>
                        {
                            arr.map((item,index)=>{
                                return(
                                    <li>
                                        <span>{item}</span>
                                        <input name={item} value={admin[item]} onChange={(e)=>setAdmin({...admin,[item]:e.target.value})}></input>
                                    </li>
                                )
                            })
                        }
                        <li id="content">
                            <input type="submit" value="提交"/>
                        </li>
                    </ul>
                </div>
                </form>
            </div>
        </div>
    )
}
export default Addadmin